package com.jiantong.work.service;

import com.jiantong.work.model.OtherPurchaseRecord;
import io.terminus.common.model.Paging;
import io.terminus.common.model.Response;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by niufei on 2017/4/8.
 *
 */
public interface OtherPurchaseRecordReadService {

    /**
     * 养殖端的分页查询
     * @param pageNo 页码
     * @param pageSize 每页多少条
     * @param status 参数
     * @return Response <Paging<OtherPurchaseRecord>>
     */
    Response<Paging<OtherPurchaseRecord>> pagingOtherPurchaseRecordsFarm(Integer pageNo , Integer pageSize ,Long breedFactoryId,  Integer status);

    /**
     * 政府端的分页查询
     * @param pageNo 页码
     * @param pageSize 每页多少条
     * @param breedFactoryId 养殖场名称
     * @param fromDate 从日期
     * @param toDate 到日期
     * @return Response <Paging<OtherPurchaseRecord>>
     */

    Response<Paging<OtherPurchaseRecord>> pagingOtherPurchaseRecordsGov(Integer pageNo , Integer pageSize , String breedFactoryName , Date fromDate , Date toDate);
    Response<Paging<OtherPurchaseRecord>> pagingOtherPurchaseRecordsGov(Integer pageNo , Integer pageSize ,Map map);

    Response<Paging<OtherPurchaseRecord>> pagingOtherPurchaseRecordsGov(Integer pageNo , Integer pageSize ,  Long breedFactoryId ,Integer breedType, Date fromDate , Date toDate);


    /**
     * 查询单据
     * @param id 单据id
     * @return OtherPurchaseRecord
     */
    Response<OtherPurchaseRecord> findOtherPurchaseRecordById(Long id);

    /**
     * 查询单据状态
     * @param id 主键id
     * @return Map<String , Integer>
     */
    Response<Map<String , Integer>> findStatusById(Long id);

    /**
     * 查询当前单据的最大值
     * @param number 单据编号
     * @return String
     */
    String findCurrentMaxNumber(String number);

    Response<Double> sumTotalPriceForWeb(Map<String, Object> map);

    Response<List<Map<String,Object>>> findOtherPurchaseInfoWeb(Map<String, Object> map);
}
